import request from 'UTIL/request';

// 任务列表
export function QueryTaskList(data) {
  return request({
    url: 'workTask/queryTaskList',
    method: 'POST',
    data: data,
    hideLoading: true
  })
}

// 查看任务详情
export function QueryTaskInfo(data) {
  return request({
    url: `workTask/queryTaskInfo/${data.taskId}`,
    method: 'POST',
    data: data
  })
}

// 新增任务
export function SaveWorkTask(data) {
  return request({
    url: 'workTask/saveWorkTask',
    method: 'POST',
    data: data
  })
}

// 设置项目任务状态
export function SetWorkTaskStatus(data) {
  return request({
    url: 'workTask/setWorkTaskStatus',
    method: 'POST',
    data: data
  })
}

// 删除任务
export function DeleteTask(data) {
  return request({
    url: `workTask/deleteWorkTask/${data.taskId}`,
    method: 'POST',
    data: data
  })
}

// 添加任务关联项
export function TaskRelation(data) {
  return request({
    url: 'workTaskRelation/saveWorkTaskRelation',
    method: 'POST',
    data: data
  })
}

// 根据任务id查询活动日志
export function TaskLog(data) {
  return request({
    url: `workTaskLog/queryTaskLog/${data.taskId}`,
    method: 'POST',
    data: data
  })
}

// 任务标签列表
export function GetLabelList(data) {
  return request({
    url: 'workTaskLabel/getLabelList',
    method: 'POST',
    data: data
  })
}

// 设置项目任务标题
export function SetWorkTaskTitle(data) {
  return request({
    url: 'workTask/setWorkTaskTitle',
    method: 'POST',
    data: data
  })
}

// 设置项目任务描述
export function SetWorkTaskDescription(data) {
  return request({
    url: 'workTask/setWorkTaskDescription',
    method: 'POST',
    data: data
  })
}

// 设置项目任务负责人
export function SetWorkTaskMainUser(data) {
  return request({
    url: 'workTask/setWorkTaskMainUser',
    method: 'POST',
    data: data
  })
}

// 设置项目任务成员
export function SetWorkTaskOwnerUser(data) {
  return request({
    url: 'workTask/setWorkTaskOwnerUser',
    method: 'POST',
    data: data
  })
}

// 设置项目任务标签
export function SetWorkTaskLabel(data) {
  return request({
    url: 'workTask/setWorkTaskLabel',
    method: 'POST',
    data: data
  })
}

// 设置项目任务优先级
export function SetWorkTaskPriority(data) {
  return request({
    url: 'workTask/setWorkTaskPriority',
    method: 'POST',
    data: data
  })
}

// 设置项目任务开始结束时间
export function SetWorkTaskTime(data) {
  return request({
    url: 'workTask/setWorkTaskTime',
    method: 'POST',
    data: data
  })
}

// 设置项目子任务状态
export function SetWorkChildTaskStatus(data) {
  return request({
    url: 'workTask/setWorkChildTaskStatus',
    method: 'POST',
    data: data
  })
}

// 编辑项目子任务
export function UpdateWorkChildTask(data) {
  return request({
    url: 'workTask/updateWorkChildTask',
    method: 'POST',
    data: data
  })
}

// 新增项目子任务
export function AddWorkChildTask(data) {
  return request({
    url: 'workTask/addWorkChildTask',
    method: 'POST',
    data: data
  })
}